
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4.1 常用功能 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="css/default.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="fit-recore.html" />
    
    
    <link rel="prev" href="start.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    1. xProxy 是什么？
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="good.html">
            
                <a href="good.html">
            
                    
                    1.1 xProxy 的优势
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="charles-diff.html">
            
                <a href="charles-diff.html">
            
                    
                    1.2 与 Charles 对比
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="INSTALL.html">
            
                <a href="INSTALL.html">
            
                    
                    2. xProxy 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    3. 面板说明
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="panel-main.html">
            
                <a href="panel-main.html">
            
                    
                    3.1 首页面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="panel-network.html">
            
                <a href="panel-network.html">
            
                    
                    3.2 Network 网络面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="panel-rule.html">
            
                <a href="panel-rule.html">
            
                    
                    3.3 Rules 规则面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="panel-value.html">
            
                <a href="panel-value.html">
            
                    
                    3.4 Values 值面板
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="start.html">
            
                <a href="start.html">
            
                    
                    4. 快速开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.1" data-path="frequent.html">
            
                <a href="frequent.html">
            
                    
                    4.1 常用功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="fit-recore.html">
            
                <a href="fit-recore.html">
            
                    
                    4.2 适配 Recore
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="fit-go.html">
            
                <a href="fit-go.html">
            
                    
                    4.3 适配乐高
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    5. 迁移
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="ihost.html">
            
                <a href="ihost.html">
            
                    
                    5.1 iHost 迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="xswitch.html">
            
                <a href="xswitch.html">
            
                    
                    5.2 xSwitch 迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="charles-m.html">
            
                <a href="charles-m.html">
            
                    
                    5.3 Charles 迁移
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    6. 规则
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="rule-model.html">
            
                <a href="rule-model.html">
            
                    
                    6.1 配置方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="rule-pattern.html">
            
                <a href="rule-pattern.html">
            
                    
                    6.2 匹配模式 pattern
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="rule-opv.html">
            
                <a href="rule-opv.html">
            
                    
                    6.3 操作值 opValue
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="rule-opp.html">
            
                <a href="rule-opp.html">
            
                    
                    6.4 匹配原则 opProtocol
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="mobile.html">
            
                <a href="mobile.html">
            
                    
                    7. 移动端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="qa.html">
            
                <a href="qa.html">
            
                    
                    8. 常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="th.html">
            
                <a href="th.html">
            
                    
                    致谢
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" >
            
                <span>
            
                    
                    反馈
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >4.1 常用功能</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5E38;&#x7528;&#x529F;&#x80FD;&#x53CA;&#x914D;&#x7F6E;&#x6A21;&#x7248;">&#x5E38;&#x7528;&#x529F;&#x80FD;&#x53CA;&#x914D;&#x7F6E;&#x6A21;&#x7248;</h1>
<blockquote>
<p><code>#</code>&#x5F00;&#x5934;&#x7684;&#x8868;&#x793A;&#x6CE8;&#x91CA;</p>
</blockquote>
<h5 id="1-&#x7ED1;&#x5B9A;&#x8F6C;&#x53D1;">1. &#x7ED1;&#x5B9A;&#x8F6C;&#x53D1;</h5>
<pre><code class="lang-sh"><span class="hljs-comment">## disable,&#x5BF9;&#x67D0;&#x4E9B;&#x57DF;&#x540D;&#x4E0D;&#x62E6;&#x622A;</span>
<span class="hljs-comment">## &#x4E00;&#x822C;&#x653E;&#x5230; Default &#x5206;&#x7EC4;</span>
/wx.qq.com/ <span class="hljs-built_in">disable</span>://intercept
<span class="hljs-comment">## filter,&#x5728;Network&#x4E0D;&#x4F1A;&#x51FA;&#x73B0;&#x67D0;&#x4E9B;&#x57DF;&#x540D;&#x7684;&#x8BF7;&#x6C42;</span>
/qq.com/ filter://hide

<span class="hljs-comment">## socks</span>
<span class="hljs-comment">## &#x4E00;&#x822C;&#x653E;&#x5230; Default &#x5206;&#x7EC4;</span>
/facebook/ socks://127.0.0.1:1080
/vk.com/ socks://127.0.0.1:1080
/google/ socks://127.0.0.1:1080

<span class="hljs-comment">## &#x4E00;&#x822C;&#x573A;&#x666F;&#x662F;&#x8C03;&#x8BD5;&#x5185;&#x5D4C;APP&#x9875;&#x9762;&#xFF0C;APP&#x5185;&#x6709;&#x4E00;&#x4E2A;&#x5165;&#x53E3;&#x94FE;&#x63A5;a&#xFF0C;&#x800C;&#x8C03;&#x8BD5;&#x7684;&#x76EE;&#x6807;&#x9875;&#x9762;&#x662F;b</span>
<span class="hljs-comment">## &#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x4E00;&#x884C;&#x914D;&#x7F6E;&#xFF0C;&#x9875;&#x9762;a&#x4F1A;&#x81EA;&#x52A8;&#x6362;&#x6210;&#x9875;&#x9762;b</span>
m.aliexpress.com/a.html m.aliexpress.com/b.html

<span class="hljs-comment">## &#x7ED1;&#x5B9A;</span>
<span class="hljs-comment">## a.b.c.d &#x662F;&#x67D0;&#x4E2A;&#x73AF;&#x5883;&#x7684;ip&#x5730;&#x5740;</span>
<span class="hljs-comment">## &#x6709;&#x65F6;&#x901A;&#x8FC7;&#x591A;&#x4E2A;&#x57DF;&#x540D;&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x90E8;&#x7F72;&#x591A;&#x5957;&#x5F00;&#x53D1;&#x73AF;&#x5883;</span>
<span class="hljs-comment">## &#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x4E24;&#x884C;&#x914D;&#x7F6E;&#x53EF;&#x4EE5;&#x5C4F;&#x853D;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x57DF;&#x540D;&#x4E0E;&#x7EBF;&#x4E0A;&#x4E0D;&#x4E00;&#x81F4;&#x7684;&#x60C5;&#x51B5;</span>
m.aliexpress.com mm.aliexpress.com
mm.aliexpress.com a.b.c.d
</code></pre>
<h5 id="2-&#x8BF7;&#x6C42;&#x4FEE;&#x6539;">2. &#x8BF7;&#x6C42;&#x4FEE;&#x6539;</h5>
<pre><code class="lang-sh"><span class="hljs-comment">## ua</span>
m.aliexpress.com ua://{wp_ua}
<span class="hljs-comment">#m.aliexpress.com ua://{ali_ua}</span>

<span class="hljs-comment">## referrer</span>
m.aliexpress.com referer://https://vk.com/
<span class="hljs-comment">## referrer null</span>
<span class="hljs-comment">#m.aliexpress.com referer://</span>

<span class="hljs-comment">## reqHeaders&#xFF0C;&#x4FEE;&#x6539;&#x8BF7;&#x6C42;&#x5934;</span>
<span class="hljs-comment">## ua&#x3001;referer&#x534F;&#x8BAE;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;reqHeaders&#x6765;&#x5B8C;&#x6210;</span>
m.aliexpress.com reqHeaders://{req-headers}
</code></pre>
<p><strong>values</strong></p>
<pre><code>```wp_ua
  Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; RM-1113) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586
```

```req-headers
  {
    &quot;X-Forwarded-For&quot;:&quot; 188.146.171.71&quot;,
    &quot;X-Real-IP&quot;:&quot; 188.146.171.71&quot;,
    &quot;X-Client-Scheme&quot;:&quot;https&quot;,
    &quot;referer&quot;:&quot;https://vk.com/&quot;,
    &quot;User-Agent&quot;:&quot;Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 AliApp(H/5)&quot;
  }
```
</code></pre><h5 id="3-&#x54CD;&#x5E94;&#x4FEE;&#x6539;">3. &#x54CD;&#x5E94;&#x4FEE;&#x6539;</h5>
<pre><code class="lang-sh"><span class="hljs-comment">## file&#xFF0C;&#x672C;&#x5730;&#x8C03;&#x8BD5;&#x662F;&#x5176;&#x5178;&#x578B;&#x7684;&#x4F7F;&#x7528;&#x573A;&#x666F;</span>
m.aliexpress.com/sw.js file:///path/to/your/<span class="hljs-built_in">local</span>/sw.js
<span class="hljs-comment">## xfile</span>
<span class="hljs-comment">#m.aliexpress.com/sw.js xfile:///path/to/your/local/sw.js</span>

<span class="hljs-comment">## tpl&#xFF0C;&#x5E38;&#x7528;&#x4E8E;mock jsonp&#x8BF7;&#x6C42;</span>
aliexpress.com/query.jsonp tpl://{res-jsonp}
<span class="hljs-comment">## xtpl&#xFF0C;&#x540C;tpl&#xFF0C;&#x672C;&#x5730;&#x4E0D;&#x5B58;&#x5728;&#x65F6;&#x8D70;&#x7EBF;&#x4E0A;</span>
aliexpress.com/query.jsonp xtpl://{res-jsonp}

<span class="hljs-comment">## resHeaders&#xFF0C;&#x4FEE;&#x6539;&#x54CD;&#x5E94;&#x5934;</span>
ae01.alicdn.com resHeaders://{res-cors}

<span class="hljs-comment">## html&#xFF0C;&#x5F80;html&#x6587;&#x6863;(&lt;/body&gt;&#x4E4B;&#x524D;)&#x8FFD;&#x52A0;html&#x6807;&#x7B7E;(script,style or normal html tag)</span>
m.aliexpress.com html://{html-test}

<span class="hljs-comment">## js&#xFF0C;&#x5F80;js&#x54CD;&#x5E94;&#x8FFD;&#x52A0;&#x811A;&#x672C;&#xFF0C;&#x5982;&#x679C;&#x54CD;&#x5E94;&#x662F;html&#x6587;&#x6863;&#xFF0C;&#x5219;&#x81EA;&#x52A8;&#x7528;`&lt;script&gt;&lt;/script&gt;`&#x5305;&#x88C5;&#x540E;&#x63D2;&#x5165;</span>
m.aliexpress.com/sw.js js://{js-test}

<span class="hljs-comment">## css&#xFF0C;&#x5F80;css&#x54CD;&#x5E94;&#x8FFD;&#x52A0;&#x6837;&#x5F0F;&#xFF0C;&#x5982;&#x679C;&#x54CD;&#x5E94;&#x662F;html&#x6587;&#x6863;&#xFF0C;&#x5219;&#x81EA;&#x52A8;&#x7528;`&lt;style&gt;&lt;/style&gt;`&#x5305;&#x88C5;&#x540E;&#x63D2;&#x5165;</span>
<span class="hljs-comment">## `/`&#x53EF;&#x4EE5;&#x8D77;&#x5230;&#x4EC5;&#x5BF9;&#x9996;&#x9875;&#x8FFD;&#x52A0;&#x7684;&#x6548;&#x679C;</span>
m.aliexpress.com/ css://{css-test}

<span class="hljs-comment">## resReplace&#xFF0C;&#x66FF;&#x6362;&#x54CD;&#x5E94;&#x7684;&#x67D0;&#x4E9B;&#x5B57;&#x7B26;&#x4E32;</span>
<span class="hljs-comment">## &#x4E00;&#x822C;&#x53EF;&#x7528;&#x6765;&#x5FEB;&#x901F;&#x9A8C;&#x8BC1;&#x67D0;&#x4E9B;&#x529F;&#x80FD;</span>
m.aliexpress.com resReplace://{res-replace}
</code></pre>
<p><strong>values</strong></p>
<pre><code>```res-jsonp # xProxy&#x4F1A;&#x7528;&#x8BF7;&#x6C42;&#x5BF9;&#x5E94;&#x7684;callback&#x503C;&#x6765;&#x66FF;&#x6362;{callback}
  {callback}({
      &quot;ec&quot;: 0,
      &quot;list&quot;:[{
            &quot;id&quot;:1,
            &quot;price&quot;:&quot;US $100&quot;,
              &quot;stock&quot;:&quot;100&quot;,
              &quot;imgUrl&quot;:&quot;https://ae01.alicdn.com/kf/HTB12x0CLpXXXXajaXXX760XFXXXS.png_640x640.png&quot;
          },...
        ]
  });
```

```html-test
  &lt;script&gt;
  // make an error
  x.x;
  &lt;/script&gt;
```

```js-test
  fetch(&quot;/&quot;).then(res=&gt;{console.log(&quot;fetched!&quot;)});
```

```css-test
  body{
    font-size:15px;
  }
```

```res-cors
  {
    &quot;access-control-allow-origin&quot;:&quot;*&quot;,
    &quot;access-control-expose-headers&quot;:&quot;Via&quot;
  }
```

```res-replace
  &lt;meta name=&quot;screen-orientation&quot; content=&quot;portrait&quot;&gt;: &lt;meta name=&quot;apple-itunes-app&quot; content=&quot;app-id=436672029&quot;&gt;
```
</code></pre><h5 id="4-&#x8C03;&#x8BD5;">4. &#x8C03;&#x8BD5;</h5>
<pre><code>m.aliexpress.com weinre://debug
m.aliexpress.com log://{log-test}
</code></pre><p><strong>values</strong></p>
<pre><code>```log-test
  console.log(&quot;Yeah!&quot;)
```
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="start.html" class="navigation navigation-prev " aria-label="Previous page: 4. 快速开始">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="fit-recore.html" class="navigation navigation-next " aria-label="Next page: 4.2 适配 Recore">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4.1 常用功能","level":"1.4.1","depth":2,"next":{"title":"4.2 适配 Recore","level":"1.4.2","depth":2,"path":"fit-recore.md","ref":"fit-recore.md","articles":[]},"previous":{"title":"4. 快速开始","level":"1.4","depth":1,"path":"start.md","ref":"start.md","articles":[{"title":"4.1 常用功能","level":"1.4.1","depth":2,"path":"frequent.md","ref":"frequent.md","articles":[]},{"title":"4.2 适配 Recore","level":"1.4.2","depth":2,"path":"fit-recore.md","ref":"fit-recore.md","articles":[]},{"title":"4.3 适配乐高","level":"1.4.3","depth":2,"path":"fit-go.md","ref":"fit-go.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"css/default.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"language":"zh-hans","gitbook":"*"},"file":{"path":"frequent.md","mtime":"2019-11-05T10:50:26.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-12-17T11:59:46.789Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

